<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>即将跳转</title>
    <script>
        function getParamer(key){
            var reg = new RegExp("(^|&)"+ key +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r!=null)return  unescape(r[2]); return null;
        }
        function jsonPost(url,data,fn){
            var xhr = new XMLHttpRequest();
            xhr.open('POST',url,true);
            xhr.setRequestHeader('Content-Type','application/json');
            xhr.send(JSON.stringify(data));
            xhr.onreadystatechange = function(){
                if(xhr.readyState == 4 && xhr.status == 200){
                    fn(JSON.parse(xhr.responseText));
                }
            }
        }
        function getHost(){
            var path = window.location.origin + window.location.pathname;
            var pathSz = path.split("/");
            pathSz.length = pathSz.length-2;
            path = pathSz.join("/");
            return path;
        }
        jsonPost(getHost()+"/php/action.php?type=9",{path:getParamer("path")},function (res){
            if(res.flag){
                window.location.href = res.data;
            }else{
                alert(res.msg);
            }
        });
    </script>
</head>
<body>

</body>
</html>